package com.lovo.common.bean;

import java.lang.annotation.Documented;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 * 
 * </p>
 *
 * @author bdk
 * @since 2021-03-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("commodity")
@Document(indexName = "commodity_index")
public class CommodityBean implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "comm_id", type = IdType.AUTO)
    @Id
    private Long commId;
    @Field(name = "commName",type = FieldType.Text,analyzer = "ik_smart", fielddata = true)
    private String commName;
    @Field(type = FieldType.Text,index = false)
    private String commImg;
    @Field(type = FieldType.Long,index = false)
    private Integer commStock;
    @Field(type = FieldType.Double)
    private BigDecimal commPrice;


}
